<!DOCTYPE html>
<html lang="zh" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="https://www.thymeleaf.org"
      xmlns:sec="https://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<head>
    <title>Spring Security OAuth 2.0 例子</title>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/webjars/bootstrap/4.5.0/css/bootstrap.min.css"
          th:href="@{/webjars/bootstrap/4.5.0/css/bootstrap.min.css}"/>
</head>
<body>
<nav class="navbar navbar-default">
    <div class="container">
        <div class="container-fluid">
            <div class="navbar-collapse" id="navbar">
                <ul class="nav navbar-nav navbar-right">
                    <li class="dropdown">
                        <a id="user-menu" href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
                           aria-haspopup="true" aria-expanded="false">
                            <span sec:authentication="name">User</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a id="sign-out" href="javascript:document.logoutForm.submit()" th:text="#{index.page.menu.sign-out}">Sign Out</a></li>
                        </ul>
                        <form name="logoutForm" th:action="@{/perform_logout}" method="post" th:hidden="true">
                            <input hidden type="submit" value="Sign Out"/>
                        </form>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</nav>
<div class="container">
    <div class="panel panel-default">
        <div th:if="${todos}" class="panel-content">
            <h4>Todos:</h4>
            <table class="table table-condensed">
                <tbody>
                <tr class="row" th:each="todo : ${todos}">
                    <td th:text="${todo}">todo</td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<script src="/webjars/jquery/3.5.1/jquery.slim.min.js"></script>
<script src="/webjars/bootstrap/4.5.0/js/bootstrap.bundle.min.js"></script>
</body>
</html>